//
//  XSGridColumn.m
//  Test
//
//  Created by xueshan1 on 2018/12/17.
//  Copyright © 2018 xueshan1. All rights reserved.
//

#import "XSGridColumn.h"

@implementation XSGridColumn

- (XSGridCell *)gridCellWithData:(id)data{
    XSGridCell *cell = [XSGridCell new];
    if ([[data valueForKeyPath:self.keyPath] isKindOfClass:[NSString class]]) {
        cell.title = [data valueForKeyPath:self.keyPath];
    }
    if ([[data valueForKeyPath:self.keyPath] isKindOfClass:[UIImage class]]) {
        cell.image = [data valueForKeyPath:self.keyPath];
    }
    cell.width = self.columnWidth;
    cell.contentPadding = self.contentPadding;
    cell.mergeLeft = self.mergeLeft;
    
    return cell;
}
@end
